package is.ru.honn.rumblr.factory;

import is.ru.honn.rumblr.domain.RegularPost;
import is.ru.honn.rumblr.domain.RumblrPost;
import is.ru.honn.rumblr.util.XmlUtil;
import org.dom4j.Element;

public class RegularPostFactory extends PostFactory
{
  @Override
  public RumblrPost createPostFromXML(Element e)
  {
    RegularPost post = new RegularPost();
    createHeader(post, e);
    post.setTitle(XmlUtil.getXPathValue(e, "regular-title"));
	post.setBody(XmlUtil.getXPathValue(e, "regular-body"));
    return post;
  }
}
